package com.thinker.plantForm.service;

import com.github.pagehelper.PageHelper;
import com.thinker.plantForm.mapper.UsersMapper;
import com.thinker.plantForm.model.Users;
import com.thinker.plantForm.util.BaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.common.Mapper;
import tk.mybatis.mapper.entity.Example;

import java.util.List;

/**
 * Created by hezi on 2017/9/8.
 */
@Service
public class UsersService extends BaseService<Users>  {
    @Autowired
    private UsersMapper usersMapper;



//    public List<Users> selectPage(int pageNum, int pageSize){
//        //查询全部
////        List<Users> usersList = usersMapper.select(new Users());
////        Example example = new Example(Users.class);
////        example.selectByRowBounds()
////        usersMapper.selectByRowBounds(unds)
////        usersMapper.secou
////        PageHelper.startPage(pageNum, pageSize);
////        //通用Example查询
////        Example example = new Example(Users.class);
////        example.createCriteria().andGreaterThan("id", 100);
////        countryList = mapper.selectByExample(example);
////        Assert.assertEquals(83, countryList.size());
//        //Spring4支持泛型注入
//        return usersMapper.select(null);
//    }
}
